<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
		<title>jqswfupload - jQuery and SWFUpload in one line</title>
		<link type="text/css" href="style.css" rel="stylesheet" />
		<link type="text/css" href="jquery.jqswfupload.css" rel="stylesheet" />
		<link type="text/css" href="jquery.jgrowl.css" rel="stylesheet" />
		<?php
			$url = "http://" . $_SERVER['SERVER_NAME'] .
   			$_SERVER['REQUEST_URI'];
		?>
		<script language="JavaScript" type="text/javascript">
			var upload_uri = "<?php echo $url; ?>";
		</script>
		<script language="JavaScript" type="text/javascript" src="libs/jquery-1.3.2.min.js"></script>
		<script language="JavaScript" type="text/javascript" src="libs/jquery-ui-1.7.1.custom.min.js"></script>
		<script language="JavaScript" type="text/javascript" src="libs/swfupload.js"></script>
		<script language="JavaScript" type="text/javascript" src="libs/jquery.jqswfupload.js"></script>
		<script language="JavaScript" type="text/javascript" src="libs/jquery.jgrowl_compressed.js"></script>
		<script language="JavaScript" type="text/javascript" src="libs/main.js"></script>
	</head>
	<body>
		<h1>jqswfupload - jQuery and SWFUpload in one line</h1>

		<pre>
/*
 * jQuery upload - main file
 */
$(document).ready(function(){
	$("#upload-container").jqswfupload({
		onUploadStart: function(file) {
			$('#debug-bar').append('Upload Started: '+file.name);
		},
		onFileSuccess: function(file,data,response) {
			$('#debug-bar').append('File success: '+ file.name + data);
		},
		onFileError: function(file,code,message){
			$('#debug-bar').append('File Error: '+ file.name + message);
		},
		totalSize: '100 kb',
		uploadUrl: upload_uri + 'upload.php',
		// The post sent to server in the same request as the file object
		post_params : {
			'type' : 'swfupload',
			'test' : 'val'
		}
	});
});
		</pre>

		<div id="upload-container">
			<form action="upload.php" method="post" enctype="multipart/form-data">
				<div id="upload-placeholder">
					<input type="file" name="Filedata" />
					<input type="submit" value="upload" />
				</div>
			</form>
		</div>
		<div id="debug-bar">
			<p>The successfully upload data goes here</p>
		</div>
	</body>
</html>